package com.indeep.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.indeep.user.mapper.po.AppVxTelBindPO;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface AppVxTelBindMapper extends BaseMapper<AppVxTelBindPO> {
    /**
     * 插入或更新app_vx_tel_bind表的记录。
     * 如果记录已存在，则更新openid和update_time字段。
     *
     * @param appVxTelBindDO 要插入或更新的记录对象
     * @return 影响的行数
     */
    @Insert("insert into app_vx_tel_bind (tel, openid, update_time, create_time)" +
            "values (#{tel}, #{openid}, #{updateTime}, #{createTime})" +
            "on duplicate key update " +
            "openid = #{openid}, " +
            "update_time = now()")
    int insertOrUpdatea (AppVxTelBindPO appVxTelBindDO);
}